package com.jh.paymentchannel.repository;

import com.jh.paymentchannel.pojo.RealNameImg;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import org.springframework.data.repository.query.Param;

import java.util.List;

@Repository
public interface RealnameImgRepository extends PagingAndSortingRepository<RealNameImg, String> {

    @Query("select realname from RealNameImg realname where realname.userId=:userId ")
    List<RealNameImg> findRealNameImgByUserid(@Param("userId") long userId);

    @Query("select  realnames from RealNameImg realnames where realnames.userId=:userId")
    List<RealNameImg> findByUserid(@Param("userId") long userId);

}
